// Author: Puyan Lotfi
// Date: Written in June 2009
// Description: Language related code for FooScope (Syntax Highlighting,
//              hierarchy parsing, etc).

#pragma once

#include <map>
#include <utility>
#include <Qsci/qscilexer.h>
#include <Qsci/qscilexer.h>
#include <Qsci/qscilexerbash.h>
#include <Qsci/qscilexerbatch.h>
#include <Qsci/qscilexercmake.h>
#include <Qsci/qscilexercpp.h>
#include <Qsci/qscilexercsharp.h>
#include <Qsci/qscilexercss.h>
#include <Qsci/qscilexerd.h>
#include <Qsci/qscilexerdiff.h>
#include <Qsci/qscilexerfortran.h>
#include <Qsci/qscilexerfortran77.h>
#include <Qsci/qscilexerhtml.h>
#include <Qsci/qscilexeridl.h>
#include <Qsci/qscilexerjava.h>
#include <Qsci/qscilexerjavascript.h>
#include <Qsci/qscilexerlua.h>
#include <Qsci/qscilexermakefile.h>
#include <Qsci/qscilexerpascal.h>
#include <Qsci/qscilexerperl.h>
#include <Qsci/qscilexerpostscript.h>
#include <Qsci/qscilexerpov.h>
#include <Qsci/qscilexerproperties.h>
#include <Qsci/qscilexerpython.h>
#include <Qsci/qscilexerruby.h>
#include <Qsci/qscilexersql.h>
#include <Qsci/qscilexertcl.h>
#include <Qsci/qscilexertex.h>
#include <Qsci/qscilexervhdl.h>
#include <Qsci/qscilexerxml.h>
#include <Qsci/qscilexeryaml.h>



typedef std::map<QString, QsciLexer*> FileExtToLexMap;

class LanguageFacilities
{

public:
    LanguageFacilities();
    ~LanguageFacilities();
    QsciLexer* getLexer(QString filename);

private:
    FileExtToLexMap        m_supportedLexers;
    QsciLexerBash*         m_bash;
    QsciLexerBatch*        m_batch;
    QsciLexerCMake*        m_cmake;
    QsciLexerCPP*          m_cpp;
    QsciLexerCSharp*       m_cs;
    QsciLexerCSS*          m_css;
    QsciLexerD*            m_d;
    QsciLexerDiff*         m_diff;
    QsciLexerFortran*      m_fortran;
    QsciLexerHTML*         m_html;
    QsciLexerIDL*          m_idl;
    QsciLexerJava*         m_java;
    QsciLexerJavaScript*   m_js;
    QsciLexerLua*          m_lua;
    QsciLexerMakefile*     m_make;
    QsciLexerPascal*       m_pascal;
    QsciLexerPerl*         m_perl;
    QsciLexerPostScript*   m_ps;
    QsciLexerPOV*          m_pov;
    QsciLexerProperties*   m_prop;
    QsciLexerPython*       m_py;
    QsciLexerRuby*         m_rb;
    QsciLexerSQL*          m_sql;
    QsciLexerTCL*          m_tcl;
    QsciLexerTeX*          m_tex;
    QsciLexerVHDL*         m_vhdl;
    QsciLexerXML*          m_xml;
    QsciLexerYAML*         m_yaml;
};
